//
//  VetifyStatusViewController.m
//  shopping
//
//  Created by 徐双 on 2017/9/1.
//  Copyright © 2017年 qianyi. All rights reserved.
//

#import "VetifyStatusViewController.h"

@interface VetifyStatusViewController ()

@end

@implementation VetifyStatusViewController

- (void)viewWillAppear:(BOOL)animated{
    
    
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:NO];
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setTitle:@"验证身份"];
    
    [self setUpInputPassword];
    [self setUpInputPasswodAgain];
    [self setUpCongigBtn];
    
}

-(void)setUpInputPassword{
    
    //设置分割线
    UIView *viewOfLine = [[UIView alloc] initWithFrame:CGRectMake(0, 0, DEF_SCREEN_WIDTH, 1)];
    [self.view addSubview:viewOfLine];
    viewOfLine.backgroundColor = [UIColor colorWithRed:233/255.0f green:233/255.0f blue:233/255.0f alpha:1.0];
    //设置label
    UILabel * label1 = [[UILabel alloc] init];
    
    label1.text = @"手机号";
    
    label1.textColor = getColor(@"333333");
    
    label1.font = [UIFont systemFontOfSize:14];
    
    [self.view addSubview:label1];
    
    [label1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).with.offset(20);
        make.left.equalTo(self.view).with.offset(12);
        make.height.offset(14);
        make.width.offset(50);
    }];
    
    //设置文本框
    UITextField * textField1 = [[UITextField alloc] init];
    textField1.placeholder = @"13855556666";
    textField1.textColor = getColor(@"333333");
    textField1.font = [UIFont systemFontOfSize:14];
    textField1.clearButtonMode =   UITextFieldViewModeAlways;
    [self.view addSubview:textField1];
    [textField1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label1.mas_right).with.offset(32);
        make.centerY.equalTo(label1.mas_centerY);
        make.height.offset(40);
        make.right.equalTo(self.view).with.offset(-18);
    }];
    
}

-(void)setUpInputPasswodAgain{
    
    //设置分割线
    UIView *viewOfLine2 = [[UIView alloc] initWithFrame:CGRectMake(0,  51, DEF_SCREEN_WIDTH, 1)];
    [self.view addSubview:viewOfLine2];
    viewOfLine2.backgroundColor = [UIColor colorWithRed:233/255.0f green:233/255.0f blue:233/255.0f alpha:1.0];
    //标题
    UILabel * label2 = [[UILabel alloc] init];
    label2.text = @"验证码";
    
    label2.textColor = getColor(@"333333");
    
    label2.font = [UIFont systemFontOfSize:14];
    [self.view addSubview:label2];
    [label2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).with.offset(19 + 51);
        make.left.equalTo(self.view).with.offset(12);
        make.height.offset(14);
        make.width.offset(50);
    }];
    
    //文本框
    UITextField * textField2 = [[UITextField alloc] init];
    textField2.placeholder = @"456879";
    textField2.textColor = getColor(@"333333");
    textField2.font = [UIFont systemFontOfSize:14];
    textField2.clearButtonMode =  UITextFieldViewModeAlways;
    [self.view addSubview:textField2];
    [textField2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label2.mas_right).with.offset(30);
        make.centerY.equalTo(label2.mas_centerY);
        make.height.offset(40);
        make.width.offset(90);
    }];
    
    //获取验证码按钮
    UIButton * btn = [[UIButton alloc] init];
    [self.view addSubview:btn];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(textField2.mas_right).with.offset(50);
        make.centerY.equalTo(textField2.mas_centerY);
        make.height.offset(31);
        make.right.equalTo(self.view).with.offset(-15);
    }];
    [btn setTitle:@"获取验证码" forState:UIControlStateNormal];
    btn.titleLabel.textAlignment = NSTextAlignmentCenter;
    btn.layer.borderColor =[UIColor colorWithRed:255/255.0f green:152/255.0f blue:30/255.0f alpha:1.0].CGColor;
    btn.layer.borderWidth = 1.0;
    [btn setTitleColor:[UIColor colorWithRed:255/255.0f green:152/255.0f blue:30/255.0f alpha:1.0] forState:UIControlStateNormal];
    
    btn.titleLabel.font = [UIFont systemFontOfSize:14];
    
}
-(void)setUpCongigBtn{
    
    //设置分割线
    UIView *viewOfLine3 = [[UIView alloc] initWithFrame:CGRectMake(0,  51 + 51, DEF_SCREEN_WIDTH, 1)];
    [self.view addSubview:viewOfLine3];
    
    viewOfLine3.backgroundColor = [UIColor colorWithRed:233/255.0f green:233/255.0f blue:233/255.0f alpha:1.0];
    UIButton * btn = [[UIButton alloc] init];
    UIColor * color = getColor(@"FFDA44");
    [btn setBackgroundColor:color];
    [btn setTitle:@"确认" forState:UIControlStateNormal];
    UIColor * color2 = getColor(@"222222");
    [btn setTitleColor:color2 forState:UIControlStateNormal];
    [self.view addSubview:btn];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.view).with.offset(20 + 51 + 51);
        make.left.equalTo(self.view).with.offset(12);
        make.height.offset(46);
        make.right.equalTo(self.view).with.offset(-15);
    }];
    
}

@end
